package ysq.xyg.recovery.service;

import ysq.xyg.base.model.dto.ReturnEntity;
import ysq.xyg.base.service.BaseService;
import ysq.xyg.recovery.model.po.RecoveryOrder;
import ysq.xyg.sys.model.po.SysUser;
import ysq.xyg.recovery.model.vo.RecoveryOrderVo;

import java.util.List;

/**
 * 回收金模块-订单管理service接口
 *
 * @author congcong tao
 * @date 2019-7-11 20:30:57
 */
public interface RecoveryOrderService extends BaseService<RecoveryOrder> {

    /**
     * 分页查询
     *
     * @param recoveryOrderVo 对象
     * @param pageSize 当前页面
     * @param pageNum 页面数量
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-7-11 20:30:57
     */
    ReturnEntity page(RecoveryOrderVo recoveryOrderVo, int pageSize, int pageNum);

    /**
     * 分页关联查询
     *
     * @param recoveryOrderVo
     * @param pageSize
     * @param pageNum
     * @author congcong tao
     * @date 2019-07-11 20:35
     */
    ReturnEntity pageLeft(RecoveryOrderVo recoveryOrderVo, int pageSize, int pageNum);

    /**
     * 修改
     *
     * @param recoveryOrderVo 对象
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-7-11 20:30:57
     */
    ReturnEntity addOrUpdate(RecoveryOrderVo recoveryOrderVo, SysUser currentUser);

    /**
     * 插入订单
     * @param openId
     * @param orderNumber
     * @param money
     * @param num
     * @author congcong tao
     * @date 2019-07-12 21:11
     */
    ReturnEntity saveOrder(String openId, String orderNumber, long money, int num);

    /**
     * 删除
     *
     * @param id 主键id删除
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-7-11 20:30:57
     */
    ReturnEntity delete(String id, SysUser currentUser);

    /**
     * 获取集合
     *
     * @param recoveryOrderVo 对象
     * @return List<RecoveryOrder> RecoveryOrder集合
     * @author congcong tao
     * @date 2019-7-11 20:30:57
     */
    List<RecoveryOrder> acceptList(RecoveryOrderVo recoveryOrderVo);

    /**
     * 查询num的总数
     * @param memberId
     * @author congcong tao
     * @date 2019-07-12 21:50
     */
    int selectSumNum(String memberId);
}
